package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
	"strings"
)

func main() {
	http.HandleFunc("/hello/", handleHelloUser)
	err := http.ListenAndServe(":12345", nil)
	if err != nil {
		log.Fatal("ListenAndServe: ", err)
	}

}

func handleHelloUser(res http.ResponseWriter, req *http.Request) {
	path := req.URL.Path
	fmt.Println(path)
	users := strings.Split(path, "/")
	fmt.Println(len(users), users)
	if len(users) == 3 {
		io.WriteString(res, users[1]+","+users[2])
	}
}
